/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:DELL
 * Date:2024-10-14
 * Time:23:59
 */
public class Test1 {
    public static void move(char pos1,char pos2) {
        System.out.println(pos1+"->"+pos2+"");
    }

    public static void hanoi(int n,char pos1,char pos2,char pos3) {
        if(n==1){
            move(pos1,pos3);
            return;
        }
        hanoi(n-1,pos1,pos3,pos2);
        move(pos1,pos3);
        hanoi(n-1,pos2,pos1,pos3);
    }

    public static void main(String[] args) {
        System.out.println(hanoi(3,'A','B','C'));
    }
    public static int fac(int n) {
        if(n==1){
            return 1;
        }
        return n*fac(n-1);

    }
    public static void main2(String[] args) {
        System.out.println(fac(5));
    }
    public static int max(int a,int b) {
        return Math.max(a,b);
    }

    public static double max(double a,double b,double c) {
        double m=Math.max(a,b);
        return Math.max(m,c);
    }
    public static void main1(String[] args) {
        System.out.println(max(2,5));
        System.out.println(max(2.4,3.5,5.6));
    }
}
